package com.itheima.stock.api;

import com.itheima.stock.dto.LoginDTO;
import com.itheima.stock.response.ResponseResult;
import com.itheima.stock.vo.CaptchaVo;
import com.itheima.stock.vo.LoginVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;


@RequestMapping(path = "/api")
public interface UserControllerAPI {


    //@GetMapping(path = "/user/test")
    String getName();

    /**
     * 验证码
     * @return
     */
    @GetMapping(path = "/captcha")
    ResponseResult<CaptchaVo> captcha();

    /**
     * 登录
     * @param loginDTO 登录密码，用户名
     * @return LoginVo
     */
    @PostMapping(path = "login")
    ResponseResult<LoginVO> login(@RequestBody LoginDTO loginDTO);


}
